package net.dgg.zz.credential.certificateType.service;

import net.dgg.zz.credential.certificateType.dao.CertificateTypeDao;
import net.dgg.zz.credential.certificateType.entity.CertificateType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class CertificateTypeService {

    @Autowired
    private CertificateTypeDao certificateTypeDao;


    /**
     * 根据条件查询证书（资质）类型等信息
     * @param params
     * @return
     */
    public List<Map> getCertificateType(Map params){
        return certificateTypeDao.getCertificateType(params);
    }

    public CertificateType findById(Long id){
        return certificateTypeDao.selectByPrimaryKey(id);
    }

    public String getCerificateTypeName(String ids){
        Map map = new HashMap();
        map.put("ids",ids);
        return certificateTypeDao.getCerificateTypeName(map);
    }
}
